/*
export function roleList() {
  return sysRequest.get<any>('role/navList');
}
export function roleByList() {
  let menu = sysRequest.get<API.Result<API.Pagination>>('role/list');
  return menu;
}
export function roleEdit(params: API.MenuTreeInfo) {
  return sysRequest.post('role/edit', params);
}
*/
//editAgent
import { apiRequest } from '@/utils/HttpRequest';

export async function agentDistributionNav(params: any) {
  return apiRequest.post<any>('permission/agentDistributionNav', params);
}

export async function agentDistributionList(id: number) {
  //SwaggerResources

  return apiRequest.get<API.BaseArrayDataResult<number>>(
    'permission/agentDistributionList',
    { id: id },
  );
}

export async function roleFindByPageList(params?: any) {
  //SwaggerResources

  return apiRequest.getList<API.DataType<API.Agent>>(
    'permission/findByPageList',
    params,
  );
}

//editAgent
export async function editRole(params: any) {
  return apiRequest.post<any>('permission/edit', params);
}
